﻿namespace Grow.Json
{
    /// <summary>
    /// Json 序列化 上下文
    /// </summary>
    public interface IJsonContext
    {
        Task<T?> DeserializeAsync<T>(string json, CancellationToken cancellationToken = default);

        Task<object?> DeserializeAsync(string json, Type type, CancellationToken cancellationToken = default);
        Task<string> SerializeAsync<T>(T value, CancellationToken cancellationToken = default);
    }
}